using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

using Circo.Essentials.Persistence.Filters;
using Circo.Essentials.BusinessLogic.Views.Filters;

namespace Circo.Essentials.Persistence.BusinessLogic.Views.Filters
{
	public class ViewCustomFilter : ViewFilter
	{

		public ViewCustomFilter() { }

		public ViewCustomFilter(string externParamName,DbType dbType, object value)
		{
			this.ExternParamName = externParamName;
			this.DBType = dbType;
			this.Value = value;
		}

		private string _externParamName;

		public string ExternParamName
		{
			get { return _externParamName; }
			set { _externParamName = value; }
		}

		private DbType _dbType;

		public DbType DBType
		{
			get { return _dbType; }
			set { _dbType = value; }
		}

		private object _value;

		public object Value
		{
			get { return _value; }
			set { _value = value; }
		}

		public override EntityFilter MapToEntity()
		{
			return (new CustomFilter(ExternParamName, DBType, Value));
		}
	}
}